<template>
  <errorCom
    imAlt="404"
    title="404 Not Found"
    tip="抱歉，您访问的页面不存在"
    :errImgUrl="img404"
    :btnList="btnList"
  />
</template>

<script>
import img404 from "./images/404.png";

import errorCom from "./components/error-com";
export default {
  name: "err404Box",
  components: { errorCom },
  data: () => ({
    img404,
    // white blue
    btnList: [{ label: "返回首页", color: "blue", isToIndex: true }],
  }),
  beforeRouteEnter(to, from, next) {
    next((vm) => {
      if (from.path == "/login") {
        vm.btnList = [{ label: "返回登录", color: "blue", isToLogin: true }];
      } else {
        vm.btnList = [{ label: "返回首页", color: "blue", isToIndex: true }];
      }
    });
  },
  mounted() {},
};
</script>
